import os.path

import pygame

from locals import *
import objects

class Player(objects.Character):
	graphic = "player.png"
	type = "player"
	walk_speed = 8

	def __init__(self, map, position, direction):
		super(Player, self).__init__(map, position, direction)
		self.keys = 0
		self.items = []

	def step(self, stepper):
		self.kill(stepper, stepper._damage)
			
	def kill(self, killer, damage_types):
		if not all(type in self._immunities for type in damage_types):
			if damage_types[0] == "creature":
				print "Ooops! Look out for creatures!"
			elif damage_types[0] == "fire":
				print "Ooops! Don't step on fire without the fire boots!"
			elif damage_types[0] == "blunt":
				print "Ooops! Watch out for moving blocks!"
			elif damage_types[0] == "water":
				print "Ooops! Chip can't swim without flippers!"
			elif damage_types[0] == "explode":
				print "Ooops! Don't touch the bombs!"
			
			self.die()